<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'编辑APP','search'=>'N'))}
	<form method='post' id="form_data" class="well form-horizontal">
		<input type="hidden" name="opmode" value="edit">
                <input type="hidden" id="id" name="id" value="{$vo.id}">
		<input type="hidden" name="ajax" id="ajax" value="1">
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="name">APP名称*：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" id="name" name="name" value="{$vo.name}" check="require" msg="请输入APP名称">
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="package">APP包名*：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" id="package" name="package" value="{$vo.package}" check="require" msg="请输入APP包名">
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="type">类型：</label>
			<div class="col-sm-8">
                            <select class="form-control" name="type">
                                <option <if condition="$vo['type'] eq 0">selected</if> value="0">请选择</option>
                                <option <if condition="$vo['type'] eq 1">selected</if> value="1">360广告</option>
                                <option <if condition="$vo['type'] eq 2">selected</if> value="2">百度广告</option>
                            </select>
			</div>
		</div>
		<div class="form-group col-sm-6">
			<label class="col-sm-4 control-label" for="is_lock">是否开启：</label>
			<div class="col-sm-8">
                            <select class="form-control" name="is_lock">
                                <option <if condition="$vo['is_lock'] eq 0">selected</if> value="0">启用</option>
                                <option <if condition="$vo['is_lock'] eq 1">selected</if> value="1">禁用</option>
                            </select>
			</div>
		</div>
		
		<div class="form-group">
			<div class="action col-sm-10 col-sm-offset-2">
				<input class="btn btn-sm btn-primary" type="button" value="保存" onclick="save();">
				<input class="btn btn-sm btn-default" type="button" value="取消" onclick="go_return_url();">
			</div>
		</div>
	</form>
</block>
<block name="js">
	<script type="text/javascript">
		function save() {
			sendForm("form_data", "{:U('save')}", "{:U('index')}");
		}
	</script>
</block>